package demoinner;
class  OuterClass {
    public int data1 = 1;
    public int data2 = 2;
    public static int data3 = 3;

    static class InnerClass{
        //静态内部类
        public int data4 = 4;
        public int data5 = 5;
        public static int data6 = 6;

        public void testInner(){
            System.out.println("InnerClass::testInner()...........");
            OuterClass outerClass1 = new OuterClass();
            System.out.println(outerClass1.data1);
            System.out.println(outerClass1.data2);
            System.out.println(data3);
            System.out.println(data4);
            System.out.println(data5);
            System.out.println(data3);
        }
    }


    public void test() {
        System.out.println("OuterClass::test()............");
    }
}
public class Test {
    public static void main(String[] args) {
        OuterClass.InnerClass innerClass = new OuterClass.InnerClass();
        innerClass.testInner();
    }
}
